#ifndef IMAGEAREA_H
#define IMAGEAREA_H

#include "area.h"

#include <QImage>
#include <QPainter>
#include <QPoint>

class ImageArea : public Area
{

public:

   ImageArea(QWidget* parent=0, int x=0, int y=0, int width=250, int height=80, int id=-1, int serial=-1);

   void setData(const QByteArray &data, bool default_size = true);

   bool isEmpty() const;
   virtual QByteArray contains() const;

private:

   void resizeEvent(QResizeEvent *);
   void paintEvent(QPaintEvent *);

private:

   QImage _image;
   QImage _defaultImage;
   QByteArray _data;

};
//
#endif // IMAGEAREA_H
